{{!
  Copyright (c) HashiCorp, Inc.
  SPDX-License-Identifier: BUSL-1.1
}}

<KvPageHeader @breadcrumbs={{@breadcrumbs}} @secretPath={{@path}}>
  <:tabLinks>
    <li>
      <LinkTo @route="secret.index" @models={{array @backend @path}} data-test-secrets-tab="Overview">Overview</LinkTo>
    </li>
    <li>
      <LinkTo @route="secret.details" @models={{array @backend @path}} data-test-secrets-tab="Secret">Secret</LinkTo>
    </li>
    <li>
      <LinkTo
        @route="secret.metadata.index"
        @models={{array @backend @path}}
        data-test-secrets-tab="Metadata"
      >Metadata</LinkTo>
    </li>
    <li>
      <LinkTo
        @route="secret.paths"
        @models={{array @backend @path}}
        data-test-secrets-tab="Paths"
        @current-when={{true}}
      >Paths</LinkTo>
    </li>
    {{#if @canReadMetadata}}
      <li>
        <LinkTo
          @route="secret.metadata.versions"
          @models={{array @backend @path}}
          data-test-secrets-tab="Version History"
        >Version History
        </LinkTo>
      </li>
    {{/if}}
  </:tabLinks>
</KvPageHeader>

<KvPathsCard @backend={{@backend}} @path={{@path}} class="has-top-margin-xl" />